import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 仓库定义查询
export const getStorage = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/WarehouseDefinition`, { params });
// 新增仓库定义
export const addStorage = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/WarehouseDefinition/Save`, params);
// 更新仓库定义
export const updateStorage = (params, id) => axios.put(`${SERVER.DMSCLOUD_PART}/basedata/WarehouseDefinition/update/${id}`, params);

// 库位查询
export const getLibrary = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/LibraryDefinition`, { params });

// 库位仓库查询
export const getBrands = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/LibraryDefinition/getStoreLibrary`, params);
// 库位添加
export const addLibrary = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/LibraryDefinition`, params);
// 库位批量添加
export const addLibraries = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/LibraryDefinition/insertLibraries`, params);

// 停用启用
export const updateStatus = params => axios.put(`${SERVER.DMSCLOUD_PART}/basedata/LibraryDefinition/changeStatus`, params);
// 查询所有操作员
export const getAllSaler = params => axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/sysManage/basedata/users/getUserListByRole`, params);
